<?php

$socket = stream_socket_client("tcp://39.98.144.29:6060",$erron,$errStr,10);

//发送数据
fwrite($socket,"1");
//接受数据
$header = fread($socket,9000);
//关闭
fclose($socket);
echo $header;

$socket = stream_socket_client("tcp://39.98.144.29:6061",$erron,$errStr,10);

//发送数据
fwrite($socket,'2');
//接受数据
$body = fread($socket,9000);
//关闭
fclose($socket);
echo $body;

$socket = stream_socket_client("tcp://39.98.144.29:6062",$erron,$errStr,10);

//发送数据
fwrite($socket,"3");
//接受数据
$footer = fread($socket,9000);
//关闭
fclose($socket);
echo $footer;